package spring.cloud.study.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import spring.cloud.study.entity.base.ResponseModel;
import spring.cloud.study.service.hystrix.PayFallbackService;

/**
 * @ClassName:PayFeignClient   
 * @Description:feign客户端调用
 * @author:Calvin.W
 * @date:2021年12月13日 上午10:17:57
 */
@Component
@FeignClient(value="PAY-SERVER",fallback=PayFallbackService.class)
public interface PayFeignClient {
	
	@GetMapping("/pay/payment/{goodId}/{amount}")
	public ResponseModel buy(@PathVariable("goodId") String goodId,@PathVariable("amount") int amount);
	
 
	@GetMapping("/pay/payment/timeout/{goodId}/{amount}")
	public ResponseModel buyTimeOut(@PathVariable("goodId") String goodId,@PathVariable("amount") int amount) ;
}
